package com.huaxin.common.Entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @author songxf
 * @date 2018/5/18
 * @Desc $desc$
 * Copyright HUAXIN DATA. All rights reserved.
 */
public class ScStationDTO extends BaseDTO implements Parcelable {


    /**
     * data : {"waterInCapacity":"","stationImg":"null/uploads/stationImg/1517389976868.png","lng":112.136783,"waterOutCapacity":"","stationState":0,"areaCost":"","deviceList":[{"imgUrl":"","model":"DSP-SH-20B","deviceName":"一体化污水处理设备","deviceCode":"20180201252375","power":"","brand":"嘉净"}],"processCapacity":"100","customWaterStandard":"","stationName":"庄滩村","lat":33.071013,"stationCost":"","deviceCost":"","contactPhone":"13951374120","stationCode":"5TUHVW","waterStandard":0,"waterCapacity":"","readCycle":"","servicePeople":100,"orgName":"苏州区域中心宿迁市","areaName":"","address":"庄滩村\u0000\u0000","buildDate":1482681600000,"sendCycle":"","serviceRange":"","contactPerson":"庄书记"}
     */

    private DataBean data;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {

    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public static class DataBean implements Parcelable {
        /**
         * waterInCapacity :
         * stationImg : null/uploads/stationImg/1517389976868.png
         * lng : 112.136783
         * waterOutCapacity :
         * stationState : 0
         * areaCost :
         * deviceList : [{"imgUrl":"","model":"DSP-SH-20B","deviceName":"一体化污水处理设备","deviceCode":"20180201252375","power":"","brand":"嘉净"}]
         * processCapacity : 100
         * customWaterStandard :
         * stationName : 庄滩村
         * lat : 33.071013
         * stationCost :
         * deviceCost :
         * contactPhone : 13951374120
         * stationCode : 5TUHVW
         * waterStandard : 0
         * waterCapacity :
         * readCycle :
         * servicePeople : 100
         * orgName : 苏州区域中心宿迁市
         * areaName :
         * address : 庄滩村
         * buildDate : 1482681600000
         * sendCycle :
         * serviceRange :
         * contactPerson : 庄书记
         */

        private String               waterInCapacity;
        private String               stationImg;
        private double               lng;
        private String               waterOutCapacity;
        private int                  stationState;
        private String               areaCost;
        private String               processCapacity;
        private String               customWaterStandard;
        private String               stationName;
        private double               lat;
        private String               stationCost;
        private String               deviceCost;
        private String               contactPhone;
        private String               stationCode;
        private int                  waterStandard;
        private String               waterCapacity;
        private String               readCycle;
        private int                  servicePeople;
        private String               orgName;
        private String               areaName;
        private String               address;
        private long                 buildDate;
        private String               sendCycle;
        private String               serviceRange;
        private String               contactPerson;
        private List<DeviceListBean> deviceList;

        public String getWaterInCapacity() {
            return waterInCapacity;
        }

        public void setWaterInCapacity(String waterInCapacity) {
            this.waterInCapacity = waterInCapacity;
        }

        public String getStationImg() {
            return stationImg;
        }

        public void setStationImg(String stationImg) {
            this.stationImg = stationImg;
        }

        public double getLng() {
            return lng;
        }

        public void setLng(double lng) {
            this.lng = lng;
        }

        public String getWaterOutCapacity() {
            return waterOutCapacity;
        }

        public void setWaterOutCapacity(String waterOutCapacity) {
            this.waterOutCapacity = waterOutCapacity;
        }

        public int getStationState() {
            return stationState;
        }

        public void setStationState(int stationState) {
            this.stationState = stationState;
        }

        public String getAreaCost() {
            return areaCost;
        }

        public void setAreaCost(String areaCost) {
            this.areaCost = areaCost;
        }

        public String getProcessCapacity() {
            return processCapacity;
        }

        public void setProcessCapacity(String processCapacity) {
            this.processCapacity = processCapacity;
        }

        public String getCustomWaterStandard() {
            return customWaterStandard;
        }

        public void setCustomWaterStandard(String customWaterStandard) {
            this.customWaterStandard = customWaterStandard;
        }

        public String getStationName() {
            return stationName;
        }

        public void setStationName(String stationName) {
            this.stationName = stationName;
        }

        public double getLat() {
            return lat;
        }

        public void setLat(double lat) {
            this.lat = lat;
        }

        public String getStationCost() {
            if (stationCode == null) {
                stationCode = "0";
            }
            return stationCost;
        }

        public void setStationCost(String stationCost) {
            this.stationCost = stationCost;
        }

        public String getDeviceCost() {
            return deviceCost;
        }

        public void setDeviceCost(String deviceCost) {
            this.deviceCost = deviceCost;
        }

        public String getContactPhone() {
            return contactPhone;
        }

        public void setContactPhone(String contactPhone) {
            this.contactPhone = contactPhone;
        }

        public String getStationCode() {
            return stationCode;
        }

        public void setStationCode(String stationCode) {
            this.stationCode = stationCode;
        }

        public int getWaterStandard() {
            return waterStandard;
        }

        public void setWaterStandard(int waterStandard) {
            this.waterStandard = waterStandard;
        }

        public String getWaterCapacity() {
            if (waterCapacity == null) {
                waterCapacity = "0.00";
            }
            return waterCapacity;
        }

        public void setWaterCapacity(String waterCapacity) {
            this.waterCapacity = waterCapacity;
        }

        public String getReadCycle() {
            if (readCycle == null) {
                readCycle = "0";
            }
            return readCycle;
        }

        public void setReadCycle(String readCycle) {

            this.readCycle = readCycle;
        }

        public int getServicePeople() {
            return servicePeople;
        }

        public void setServicePeople(int servicePeople) {
            this.servicePeople = servicePeople;
        }

        public String getOrgName() {
            return orgName;
        }

        public void setOrgName(String orgName) {
            this.orgName = orgName;
        }

        public String getAreaName() {
            return areaName;
        }

        public void setAreaName(String areaName) {
            this.areaName = areaName;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public long getBuildDate() {
            return buildDate;
        }

        public void setBuildDate(long buildDate) {
            this.buildDate = buildDate;
        }

        public String getSendCycle() {
            if (sendCycle == null) {
                sendCycle = "0";
            }
            return sendCycle;
        }

        public void setSendCycle(String sendCycle) {
            this.sendCycle = sendCycle;
        }

        public String getServiceRange() {
            return serviceRange;
        }

        public void setServiceRange(String serviceRange) {
            this.serviceRange = serviceRange;
        }

        public String getContactPerson() {
            return contactPerson;
        }

        public void setContactPerson(String contactPerson) {
            this.contactPerson = contactPerson;
        }

        public List<DeviceListBean> getDeviceList() {
            return deviceList;
        }

        public void setDeviceList(List<DeviceListBean> deviceList) {
            this.deviceList = deviceList;
        }

        public static class DeviceListBean implements Parcelable {
            /**
             * imgUrl :
             * model : DSP-SH-20B
             * deviceName : 一体化污水处理设备
             * deviceCode : 20180201252375
             * power :
             * brand : 嘉净
             */

            private String imgUrl;
            private String model;
            private String deviceName;
            private String deviceCode;
            private String power;
            private String brand;

            public String getImgUrl() {
                return imgUrl;
            }

            public void setImgUrl(String imgUrl) {
                this.imgUrl = imgUrl;
            }

            public String getModel() {
                return model;
            }

            public void setModel(String model) {
                this.model = model;
            }

            public String getDeviceName() {
                return deviceName;
            }

            public void setDeviceName(String deviceName) {
                this.deviceName = deviceName;
            }

            public String getDeviceCode() {
                return deviceCode;
            }

            public void setDeviceCode(String deviceCode) {
                this.deviceCode = deviceCode;
            }

            public String getPower() {
                return power;
            }

            public void setPower(String power) {
                this.power = power;
            }

            public String getBrand() {
                return brand;
            }

            public void setBrand(String brand) {
                this.brand = brand;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(this.imgUrl);
                dest.writeString(this.model);
                dest.writeString(this.deviceName);
                dest.writeString(this.deviceCode);
                dest.writeString(this.power);
                dest.writeString(this.brand);
            }

            public DeviceListBean() {
            }

            protected DeviceListBean(Parcel in) {
                this.imgUrl = in.readString();
                this.model = in.readString();
                this.deviceName = in.readString();
                this.deviceCode = in.readString();
                this.power = in.readString();
                this.brand = in.readString();
            }

            public static final Creator<DeviceListBean> CREATOR = new Creator<DeviceListBean>() {
                @Override
                public DeviceListBean createFromParcel(Parcel source) {
                    return new DeviceListBean(source);
                }

                @Override
                public DeviceListBean[] newArray(int size) {
                    return new DeviceListBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.waterInCapacity);
            dest.writeString(this.stationImg);
            dest.writeDouble(this.lng);
            dest.writeString(this.waterOutCapacity);
            dest.writeInt(this.stationState);
            dest.writeString(this.areaCost);
            dest.writeString(this.processCapacity);
            dest.writeString(this.customWaterStandard);
            dest.writeString(this.stationName);
            dest.writeDouble(this.lat);
            dest.writeString(this.stationCost);
            dest.writeString(this.deviceCost);
            dest.writeString(this.contactPhone);
            dest.writeString(this.stationCode);
            dest.writeInt(this.waterStandard);
            dest.writeString(this.waterCapacity);
            dest.writeString(this.readCycle);
            dest.writeInt(this.servicePeople);
            dest.writeString(this.orgName);
            dest.writeString(this.areaName);
            dest.writeString(this.address);
            dest.writeLong(this.buildDate);
            dest.writeString(this.sendCycle);
            dest.writeString(this.serviceRange);
            dest.writeString(this.contactPerson);
            dest.writeList(this.deviceList);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.waterInCapacity = in.readString();
            this.stationImg = in.readString();
            this.lng = in.readDouble();
            this.waterOutCapacity = in.readString();
            this.stationState = in.readInt();
            this.areaCost = in.readString();
            this.processCapacity = in.readString();
            this.customWaterStandard = in.readString();
            this.stationName = in.readString();
            this.lat = in.readDouble();
            this.stationCost = in.readString();
            this.deviceCost = in.readString();
            this.contactPhone = in.readString();
            this.stationCode = in.readString();
            this.waterStandard = in.readInt();
            this.waterCapacity = in.readString();
            this.readCycle = in.readString();
            this.servicePeople = in.readInt();
            this.orgName = in.readString();
            this.areaName = in.readString();
            this.address = in.readString();
            this.buildDate = in.readLong();
            this.sendCycle = in.readString();
            this.serviceRange = in.readString();
            this.contactPerson = in.readString();
            this.deviceList = new ArrayList<DeviceListBean>();
            in.readList(this.deviceList, DeviceListBean.class.getClassLoader());
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }
}
